<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<link rel="stylesheet" type="text/css" href="../../../css/base.css" />
		<link id="easyuiTheme"  rel="stylesheet" type="text/css" href="../../../easy-ui/themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="../../../easy-ui/themes/icon.css">
		<script type="text/javascript" src="../../../easy-ui/jquery.min.js"></script>
		<script type="text/javascript" src="../../../easy-ui/jquery.easyui.min.js"></script>
	    <script type="text/javascript" src="../../../js/base.js" ></script>
	</head>

	<body class="easyui-layout" data-options="fit:true" style="overflow:hidden;">
		<!-- 表单提交-->
		<div data-options="region:'south',border:false," style="height:40px;text-align:center;">
			<table style="width:100%;margin-top:8px;" >
				<tr>
					<td style="align:center;">
						<a href='javascript:void(-1);' onclick="baseFormSubmit();"; class="easyui-linkbutton" data-options="iconCls:'icon-save'">确定</a>&nbsp;&nbsp;
						<a href='javascript:void(-1);' onclick="baseFormReset();";  class="easyui-linkbutton" data-options="iconCls:'icon-back'">重置</a>
					</td>
				</tr>
			</table>
		</div>	
		<div data-options="region:'center',border:true,">
			<!-- the baseForm start  -->
			<form id="baseForm" method="post" target="hiddenFrame" style="margin:0px;padding:0px;overflow:hidden;">
				<input  name="id" id="id" type="hidden" ></input>
	  			<table border="0" cellpadding="0" cellspacing="3" class="data-table">
				<!-- 表格的布局控制 -->
					<tr class="data-table-base-tr">
						<td  class="data-table-label" >
						</td>
						<td id="table_input_base" >
						</td>
						<td  class="data-table-right-margin"></td>
					</tr>
					<!-- 表格的布局控制 结束 -->
				
					<tr>
						<td  class="data-table-label">
							名称：<font color="#FF0000">*</font>
						</td>
						<td class="data-table-input">
							<input  name="name" id="name" style="width:100%;" type="text"   class="textbox" ></input>
						</td>
					</tr>
					
					<tr>
						<td  class="data-table-label" >
							编码：
							<font color="#FF0000">*</font>
						</td>
						<td class="data-table-input">
							<input  name="code" id="code" style="width:100%;" type="text"   class="textbox" ></input>
						</td>
					</tr>
					
					<tr>
							<td  class="data-table-label">
							描述：<font color="#FF0000">*</font>
							</td>
							<td class="data-table-input">
								<input type="text" name="des"  id="des" style="width:100%;" class="textbox" />
							</td>
							<td  class="data-table-right-margin">&nbsp;</td>
						</tr>
						<tr>
							<td  class="data-table-label">
							排序：<font color="#FF0000">*</font>
							</td>
							<td class="data-table-input">
								<input type="text" name="sort"  id="sort" style="width:100%;" class="textbox" />
							</td>
							<td  class="data-table-right-margin">&nbsp;</td>
						</tr>
						<!-- <tr>
							<td  class="data-table-label">
							必选标志：<font color="#FF0000">*</font>
							</td>
							<td class="data-table-input" colspan=2 >
							<input class="easyui-combobox" id="mustFlag" name="mustFlag"
								data-options="valueField:'id',textField:'text',editable:false," style="width:100%;"/>
							</td>
							<td  class="data-table-right-margin">&nbsp;</td>
						</tr> -->
				</table>
			</form>
			<!-- the baseForm end  -->
		</div>

		<script type="text/javascript">
			function initPage(){
				parent.showProgressing();
				document.getElementById('id').value=parent.parent.mainFrame_id.selections[0].id;
				sendRequestAjax('../../../zcliverole/initUpdate.do?responseFunction=initUpdate',initUpdate);
			}
			
			window.onload=function(){
				 initPage();
			}
			
			var responseResultPage;
			function initUpdate(responseResult){
	//			alert(iframeResponseText.entity.loginId);
				setFormDefault(responseResult); 
				responseResultPage=responseResult;
				
				/* $('#mustFlag').combobox({
			  		data: [{id:'0',text:'非必须的'},{id:'1',text:'必须的'}],
			  		value:responseResult.entity.mustFlag,
			  		width:parseInt($("#table_input_base")[0].offsetWidth)+2,
			  		onSelect: function(record){
				  			document.getElementById("mustFlag").value=record.id;
					}
				}); */
				
				parent.closeProgressing();
			}
		
			//form表单 提交 重置 提交后响应处理 ----------------
			function baseFormSubmit(){
	//			document.getElementById('baseForm').action='../../sysrole/updateSave.do?responseFunction=updateSave';
	//			document.getElementById('baseForm').submit();
				parent.showProgressing();
				sendRequestAjax('../../../zcliverole/updateSave.do?responseFunction=updateSave',updateSave);
			}
			
			function  baseFormReset(){
				 setFormDefault(responseResultPage); 	
			}
			
			function updateSave(responseResult){
				executeWindowCallback({});
				if(responseResult.slide_msg_key==1){
					parent.parent.showSlideMsg(responseResult.slide_msg_message_key);
				}
				curWinClose();
			}
			//form表单 提交 重置 提交后响应处理结束 ------------
		</script>
	</body>
</html>